unit u_ved;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Buttons, StdCtrls;

type
  Tfvers = class(TForm)
    mem: TMemo;
    addm: TMemo;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    procedure FormCreate(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure addmKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fvers: Tfvers;

implementation

{$R *.DFM}

procedure Tfvers.FormCreate(Sender: TObject);
begin
 mem.Lines.LoadFromFile('d:\client\0client\version.txt');
 addm.Lines.Clear;
 addm.lines.add(datetostr(now)+'/'+timetostr(now)+' : ');
end;

procedure Tfvers.SpeedButton1Click(Sender: TObject);
begin
 mem.Lines.AddStrings(addm.lines);
 addm.Lines.Clear;
 addm.lines.add(datetostr(now)+'/'+timetostr(now)+' : ');
end;

procedure Tfvers.FormActivate(Sender: TObject);
begin
  addm.setfocus;
end;

procedure Tfvers.SpeedButton2Click(Sender: TObject);
begin
 close;
end;

procedure Tfvers.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
 mem.lines.savetofile('d:\client\0client\version.txt');
end;

procedure Tfvers.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
 if key=27 then close;
end;

procedure Tfvers.addmKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
 if (ssctrl in shift) and (key=13) then begin key:=0;speedbutton1.OnClick(sender);end;
end;

end.
